<?php
echo '<div id="content">';
foreach ($news as $news_item): ?>

    <h2><?php echo $news_item['title'] ?></h2><span>&nbsp;&nbsp; <a href="news/<?php echo $news_item['slug'] ?>">View article</a></span>
    <div id="main">
        <?php echo $news_item['text'] ?>
    </div>


<?php endforeach ?>
</div> <!--content-->
<!--    <p><a href="news/
    <?php //echo $news_item['slug'] ?>">View article</a></p>-->